package com.cartel.genius.dto;

import java.io.Serializable;
import java.util.Calendar;

import javax.xml.bind.annotation.XmlRootElement;

/**
 * Data transfer object for Place
 * 
 * @author naresred
 */
@XmlRootElement (name = "Place")
public class PlaceTO implements Serializable {

	private static final long serialVersionUID = 1L;
	
	private int placeId;
	private String placeCode;
	private String placeName;
	private int parentPlaceId;
	private String parentPlaceName;
	private String parentPlaceCode;
	
	private CategoryTO categoryTO;
	
	private CategoryTO parentCatogoryTO;
	
	private Calendar createdDate;
	private Calendar modifiedDate;
	private Calendar parentCreatedDate;
	private Calendar parentModifiedDate;	
	
	public PlaceTO() {		
	}
	 
	public int getPlaceId() {
		return placeId;
	}
	
	public void setPlaceId(int placeId) {
		this.placeId = placeId;
	}
	
	public String getPlaceCode() {
		return placeCode;
	}
	
	public void setPlaceCode(String placeCode) {
		this.placeCode = placeCode;
	}
	
	public String getPlaceName() {
		return placeName;
	}
	
	public void setPlaceName(String placeName) {
		this.placeName = placeName;
	}
	
	public int getParentPlaceId() {
		return parentPlaceId;
	}
	
	public void setParentPlaceId(int parentPlaceId) {
		this.parentPlaceId = parentPlaceId;
	}
	
	public String getParentPlaceName() {
		return parentPlaceName;
	}
	
	public void setParentPlaceName(String parentPlaceName) {
		this.parentPlaceName = parentPlaceName;
	}	
	
	public String getParentPlaceCode() {
		return parentPlaceCode;
	}

	public void setParentPlaceCode(String parentPlaceCode) {
		this.parentPlaceCode = parentPlaceCode;
	}

	public CategoryTO getCategoryTO() {
		return categoryTO;
	}
	
	public void setCategoryTO(CategoryTO categoryTO) {
		this.categoryTO = categoryTO;
	}	

	public CategoryTO getParentCatogoryTO() {
		return parentCatogoryTO;
	}

	public void setParentCatogoryTO(CategoryTO parentCatogoryTO) {
		this.parentCatogoryTO = parentCatogoryTO;
	}
	
	public Calendar getCreatedDate() {
		return createdDate;
	}

	public void setCreatedDate(Calendar createdDate) {
		this.createdDate = createdDate;
	}

	public Calendar getModifiedDate() {
		return modifiedDate;
	}

	public void setModifiedDate(Calendar modifiedDate) {
		this.modifiedDate = modifiedDate;
	}
	
	public Calendar getParentCreatedDate() {
		return parentCreatedDate;
	}

	public void setParentCreatedDate(Calendar parentCreatedDate) {
		this.parentCreatedDate = parentCreatedDate;
	}

	public Calendar getParentModifiedDate() {
		return parentModifiedDate;
	}

	public void setParentModifiedDate(Calendar parentModifiedDate) {
		this.parentModifiedDate = parentModifiedDate;
	}

	/*@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((categoryTO == null) ? 0 : categoryTO.hashCode());
		result = prime * result + parentPlaceId;
		result = prime * result + ((parentPlaceName == null) ? 0 : parentPlaceName.hashCode());
		result = prime * result + ((placeCode == null) ? 0 : placeCode.hashCode());
		result = prime * result + placeId;
		result = prime * result + ((placeName == null) ? 0 : placeName.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (getClass() != obj.getClass()) {
			return false;
		}
		PlaceTO other = (PlaceTO) obj;
		if (categoryTO == null) {
			if (other.categoryTO != null) {
				return false;
			}
		} else if (!categoryTO.equals(other.categoryTO)) {
			return false;
		}
		if (parentPlaceId != other.parentPlaceId) {
			return false;
		}
		if (parentPlaceName == null) {
			if (other.parentPlaceName != null) {
				return false;
			}
		} else if (!parentPlaceName.equals(other.parentPlaceName)) {
			return false;
		}
		if (placeCode == null) {
			if (other.placeCode != null) {
				return false;
			}
		} else if (!placeCode.equals(other.placeCode)) {
			return false;
		}
		if (placeId != other.placeId) {
			return false;
		}
		if (placeName == null) {
			if (other.placeName != null) {
				return false;
			}
		} else if (!placeName.equals(other.placeName)) {
			return false;
		}
		return true;
	}

	@Override
	public String toString() {
		return "PlaceTO [placeId=" + placeId + ", placeCode=" + placeCode + ", placeName=" + placeName + ", parentPlaceId="	+ parentPlaceId + ", parentPlaceName=" + parentPlaceName + "]";
	}	*/

}
